Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: trigger to kick player?

  1. #11

    Default

    I just changed it to

    if (waitthread is_under_map local.player local.botz local.topz)
    {
    local.player iprint "That Fool Was Kicked For Going Under Map"
    wait 1
    local.player stufftext "disconnect;"


    }

    Man I love it.

  2. #12
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    Just a FYI

    When you have
    local.player iprint "That Fool Was Kicked For Going Under Map"
    It will only print that message to the player who is getting kicked, not to the rest of the players still on the server.

    Add this , it will make it look alittle better

    Code:
    if (waitthread is_under_map local.player local.botz local.topz)
    {
    ///Makes player say something in Chat
    local.player stufftext ("say I Went under the map, KICK ME!")
    waitframe
    /// Sets the disconnect message
    local.player stufftext ("set com_errormessage " + "You were Kicked Going Under the Map")
    waitframe
    /// Disconnects the player then shows them why they were kicked using menu errormessgae
    local.player stufftext "disconnect;pushmenu main;wait 200;pushmenu errormessage"
    
    wait 1
    /// Prints to everyone left in server at the top left in White text... 
    iprintln("That Fool Was Kicked For Going Under Map") 1
    }

    }

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  3. #13

    Default

    lol like I said learn something each day

  4. #14

    Default

    Code:
    local.player stufftext "disconnect;"
    this will disconnect the player that triggers?... is that what the local says?

  5. #15

    Default

    what I use

    Code:
      	local.trig = spawn trigger_multiple
     	local.trig.origin = ( 484.89 2680 -24 ) // here you set your coordinates
     	local.trig setsize ( -99 -99 -49 ) (  99 99 49 ) // here you have to experiment a bit , to set the hight and lengt of it
     	local.trig setthread assholes
     	local.trig message " Your Shit Out Of Luck Now" //here you can set your message
     	local.trig delay 0 // here you can set the trigger time when it should react
    
    end
    	assholes:
     local.assholes = parm.other
     	wait .5
     	local.asshole stufftext "disconnect"
    	end

  6. #16

    Default

    yes but local says that the local player will disconnect?... or will it disconnect everyone?

  7. #17

    Default

    just the player who triggered it

  8. #18

    Default

    local.player respawn would be a better one to use, also use a trigger_multipleall, remember Omahas Minefields where you could run across them if there was 2 or more of you? If they were trigger_multipleall triggers that would never happen.
    Last edited by Cobra {sfx}; December 29th, 2015 at 06:24 AM.

  9. #19

    Default

    Quote Originally Posted by Purple Elephant1au View Post
    Yes mefys mod includes mapfixes along with undermap detection. Its not just for FT, includes lots of fixes to round endings,bombs etc.

    The cheat police fix i think map specific , so in order to make it kick the player, you will have to edit each map.scr.
    For example ( obj/obj_team4)
    In each map.scr you will find something like this relatively close to the top
    Code:
    /////////////////////
    // ADD DEATH BOXES //
    /////////////////////
    thread _trigSet "trig_touch" 0 "kick" -4000 -6000 0.13 3000 8000 0.14         
    thread _trigSet "trig_touch" 0 "kill" 117 2740 144 275 2740 150
    There may be more then just these 2. Anyway want you want to do is add/or change the action of what the trigger does, in this case its kill. Change it to 'kick'

    Thats half way , now we have to add what the 'kick' does, since it doesnt already have an option to kick,we will make one.
    Scoll down to the _trigAction: thread and find the switch command which has the list of commands.

    Code:
    switch ( self.ham_action )
        {
          case "hurt1":   local.player hurt 1 ; break
          case "hurt5":   local.player hurt 5 ; break
          case "hurt10":  local.player hurt 10 ; break
          case "hurt25":  local.player hurt 25 ; break
          case "hurt50":  local.player hurt 50 ; break
          case "die":      local.player hurt 10000 ; break
          case "kill":    local.player kill ; break
          case "respawn": local.player respawn ; break
          case "weapnext":local.player weapnext ; break
          case "weapdrop":local.player weapdrop ; break
          case "holster": local.player safeholster 1 ; break
          case "stand":      local.player modheight stand ; break
          case "duck":      local.player modheight duck ; break
          case "ciact":      thread outofbounds local.player ; break
          case "warn":      thread sendwarning local.player ; break
          case "kick": thread kickplayer local.player ; break
          default:      local.player stufftext self.ham_action ; break
        }
    Now we want to add another case called 'kick' leading to another thread, just like the warn and ciact cases did. So add
    case "kick": thread kickplayer local.player ; break

    Next add the following thread under the others
    Code:
    kickplayer local.player:
    
    // Gets clientnum 
    local.clientnum = getclientnum local.player         
    //Kicks them
    stuffsrv ("clientkickr " + local.clientnum + " Going under the Map")
    
    end
    That should do it, now you will have to do for EVERY map you use, in each of the corresponding script files for the maps, ie maps/dm/mohdm6.scr etc




    Or if you were to use Mefys mod, you might be already without knowing it.
    Mefys undermap detection is located at global/libmef/util.scr::under_map_thread
    And good thing about that is you only have to add something to it ONCE,
    Find the under_thread, look for
    Code:
    if (waitthread is_under_map local.player local.botz local.topz)
                    {
                        local.player takedamage
                        local.player hurt 1000
                        local.player iprint "You were killed for going under the map."
                    }
    And replace with
    Code:
    if (waitthread is_under_map local.player local.botz local.topz)
     {                  
    // Gets clientnum 
    local.clientnum = getclientnum local.player           
    //Kicks them
    stuffsrv ("clientkickr " + local.clientnum + " Going under the Map")
    
    }
    Hello , need to block undermap in dm/mohdm7 door trick.

    But i dont find this part in mefy freeze tag , map.scr :

    Code:
    /////////////////////
    // ADD DEATH BOXES //
    /////////////////////
    thread _trigSet "trig_touch" 0 "kick" -4000 -6000 0.13 3000 8000 0.14         
    thread _trigSet "trig_touch" 0 "kill" 117 2740 144 275 2740 150
    also wanna add in dm/mohdm3 under map kill , so i saw This :

    http://www.mohaaaa.co.uk/AAAAMOHAA/c...gels-map-fixes

    Its got mike torso and in elgbot there is mike torso too , cant find the difference

    Thanks

  10. #20

    Default

    Quote Originally Posted by Getrs View Post
    Its got mike torso and in elgbot there is mike torso too , cant find the difference
    Use a program like WinMerge to find differences in files. It will be helpful for all the state files you've been asking about.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •